#include <sys/types.h>
#include <unistd.h>

#include <glib.h>

typedef struct _Exec
{
	pid_t pid;
	gboolean stop_music;
	gpointer user_data;
	int timer;
	
	int argc;
	char **argv;
	char *cmd;
	
	gboolean (*finished_func)(struct _Exec * exec,gpointer data);
}Exec;

Exec *exec_create(const char* cmd,int argc,char **argv,gboolean stop_music,
				  gboolean (*func)(Exec* exec,gpointer data),
				  gpointer user_data);
void exec_destroy(Exec *exec);
